﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/AdminPanel/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<Domain.PrintMedia>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Paper types</h2>

    <p>
        <%: Html.ActionLink("Create New", "Create",null, new { @class = "icon-link create-link" }) %>
    </p>

    <table>
        <tr>
            
            <th>
                Code
            </th>
            <th>
                Name
            </th>
            <th>
                Weight
            </th>
            <th>
                Price
            </th>
            <th>
                Size ISO
            </th>
            <th></th>
        </tr>

    <% for (int i = 0; i < Model.Count();i++ )
       {
           var item = Model[i];%>
    
        <tr <%=i%2==0?"class=\"alt\"":"" %>>
           
            <td>
                <%: item.PrintMediaCode%>
            </td>
            <td>
                <%: item.NameEn%>
            </td>
            <td>
                <%: item.Weight%>
            </td>
            <td>
                <%: String.Format("{0:F}", item.Price)%>
            </td>
            <td>
                <%: item.SizeISO%>
            </td>
             <td>
                <%: Html.ActionLink("Edit", "Edit", new { id = item.PrintMediaCode }, new { @class = "icon-link edit-link" })%> |
                <%: Html.ActionLink("Details", "Details", new { id = item.PrintMediaCode }, new { @class = "icon-link details-link" })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id = item.PrintMediaCode }, new { @class = "icon-link delete-link" })%>
            </td>
        </tr>
    
    <% } %>

    </table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
</asp:Content>

